package biz.datalk.industrialland.common.encrypt.exception;

import biz.datalk.industrialland.common.exception.ApplicationException;
import biz.datalk.industrialland.common.result.UnifyResultCode;

/**
 * 加解密异常
 *
 * @author tarofang@163.com
 * @date 2019-08-25
 */
public class EncryptionException extends ApplicationException {

    private static final long serialVersionUID = 5203974935660068730L;

    public static final String MESSAGE = "加解密异常";

    public EncryptionException() {
        super(MESSAGE);
    }

    public EncryptionException(String message) {
        super(MESSAGE);
        this.code = UnifyResultCode.ENCRYPTION_ERROR;
    }

    public EncryptionException(String code, String message) {
        super(message);
        this.code = code;
    }

    public EncryptionException(String message, Throwable cause) {
        super(message, cause);
        this.code = UnifyResultCode.ENCRYPTION_ERROR;
    }

    public EncryptionException(String code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
    }

    public EncryptionException(Throwable cause) {
        super(cause);
        this.code = UnifyResultCode.ENCRYPTION_ERROR;
    }
}
